//
//  KnowledgeTableViewCell.m
//  DeepBreathing
//
//  Created by rimi on 15/12/20.
//  Copyright © 2015年 rimi. All rights reserved.
//

#import "KnowledgeTableViewCell.h"

@implementation KnowledgeTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        [self initWithUserInterface];
    }
    return  self;
}
-(void)initWithUserInterface{
//    
//    UIImageView *backImage = [[UIImageView alloc]initWithFrame:self.frame];
//    
//    backImage.image = [UIImage imageNamed:@"哮喘知识单元格背景"];
//    
//    [self.contentView addSubview:backImage];
    
    
    
    _titlelabel = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(self.frame)/3 + 20, 15, CGRectGetMaxX(self.frame)/3*2 - 20, 40)];
    
    _titlelabel.textAlignment = NSTextAlignmentLeft;
    
    _titlelabel.font = [UIFont systemFontOfSize:18];
    
    _titlelabel.textColor = [UIColor colorWithRed:1.0 green:0.6968 blue:0.74 alpha:1.0];

    
    _titlelabel.backgroundColor = [UIColor clearColor];
    
    [self.contentView addSubview:_titlelabel];
    
    
    _logoiamgeView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, CGRectGetMaxX(self.frame)/3, 120)];
    
    _logoiamgeView.backgroundColor = [UIColor clearColor];
    
    [self.contentView addSubview:_logoiamgeView];
    
    
    _dateLabel = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(self.frame) - 20, 90, CGRectGetMaxX(self.frame)/3, 20)];
    
    _dateLabel.textAlignment = NSTextAlignmentLeft;
    
    
    _dateLabel.font = [UIFont systemFontOfSize:12];
    
    _dateLabel.backgroundColor = [UIColor clearColor];
    
    [self.contentView addSubview:_dateLabel];
    
    
}

@end
